From 4a6483e6b13bed07a1d01b6a795027945fa8cbdf Mon Sep 17 00:00:00 2001 From: "kaf24@freefall.cl.cam.ac.uk" Date: Thu, 16 Sep 2004 11:28:59 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.155 (414978fb_upK1Chu4SGdV6AGC6e2jg) Cset exclude: cl349@freefall.cl.cam.ac.uk|ChangeSet|20040916093252|64395 --- linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c index 405cd09c28..9501c26978 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c @@ -393,12 +393,11 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) tx->size = skb->len; wmb(); /* Ensure that backend will see the request. */ - i++; - np->tx->req_prod = i; + np->tx->req_prod = i + 1; network_tx_buf_gc(dev); - if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE ) + if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) ) { np->tx_full = 1; netif_stop_queue(dev); @@ -411,7 +410,7 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Only notify Xen if there are no outstanding responses. */ mb(); - if ( np->tx->resp_prod != i ) + if ( np->tx->resp_prod == i ) notify_via_evtchn(np->evtchn); return 0; -- 2.30.2